<template>
	<div class="dealer-container">
		<div class="betslip">
			<strong class="strong">
				{{ $t('game.game_betslip.note_information') }}
			</strong>
			<div>
				<el-row class="paddingLR paddingB">
					<el-col :span="6">
						{{ $t('game.game_betslip.bet_number') }}：
						{{ dataList.id || '-' }}
					</el-col>
					<el-col :span="6">
						{{ $t('game.game_betslip.generated_id') }}：
						{{ dataList.generatedId || '-' }}
					</el-col>
					<el-col :span="6">
						注单类型：
						{{ parentBetTypes[dataList.betType] }}
					</el-col>
					<!-- <el-col :span="6">
						投注子类：
						{{
							parentBetSubTypes[dataList.parentBetType] &&
							parentBetSubTypes[dataList.parentBetType][
								dataList.betType
							]
						}}
					</el-col> -->
					<el-col :span="6">
						俱乐部ID：
						{{ dataList.clubId }}
					</el-col>
					<el-col :span="6">
						牌桌号：
						{{ dataList.tableCode || '-' }}
					</el-col>
					<el-col :span="6">
						牌桌名称：
						{{ dataList.tableName || '-' }}
					</el-col>
					<el-col :span="6">
						玩法名称：
						{{ dataList.gameTypeName || '-' }}
					</el-col>
					<el-col :span="6">
						手牌号：
						{{ dataList.handCode || '-' }}
					</el-col>
					<!-- <el-col :span="6">
						{{ $t('game.game_betslip.venue_name_details') }}：
						{{ dataList.venueName || '-' }}
					</el-col> -->
					<!-- <el-col :span="6">
						{{ $t('game.game_manage.game_name') }}：
						{{ dataList.gameTypeName || '-' }}
					</el-col> -->
					<!-- <el-col :span="6">
						{{ $t('game.game_betslip.platform_name') }}：
						{{ dataList.platformName || '-' }}
					</el-col> -->
					<el-col :span="6">
						{{ $t('game.game_betslip.bet_amount') }}：
						<span
							:style="{ color: amountColor(dataList.betAmount) }"
							v-if="dataList.betAmount"
						>
							{{ handleCurrency(lookMsgList.memberCurrency) }}
							<span v-if="lookMsgList.memberCurrency === 'VND'">
								{{
									handleNumber(
										lookMsgList.memberCurrency,
										dataList.betAmount
									)
								}}
							</span>
							<span v-else>
								{{
									 handleNumber(
												lookMsgList.memberCurrency,
												dataList.betAmount
										  )
								}}
							</span>
						</span>
						<span v-else>-</span>
					</el-col>
					<el-col :span="6">
						{{ $t('game.game_betslip.efficient_bet') }}：
						<span
							:style="{
								color: amountColor(dataList.validBetAmount)
							}"
						>
							{{ handleCurrency(lookMsgList.memberCurrency) }}
							<span v-if="lookMsgList.memberCurrency === 'VND'">
								{{
									handleNumber(
										lookMsgList.memberCurrency,
										dataList.validBetAmount
									)
								}}
							</span>
							<span v-else>
								{{
									dataList.validBetAmount !== null
										? handleNumber(
												lookMsgList.memberCurrency,
												dataList.validBetAmount
										  )
										: '-'
								}}
							</span>
						</span>
					</el-col>
					<el-col :span="6">
						{{ $t('game.game_betslip.netAmount') }}：
						<span
							:style="{ color: amountColor(dataList.netAmount) }"
						>
							{{ handleCurrency(lookMsgList.memberCurrency) }}
							<span v-if="lookMsgList.memberCurrency === 'VND'">
								{{
									handleNumber(
										lookMsgList.memberCurrency,
										dataList.netAmount
									)
								}}
							</span>
							<span v-else>
								{{
									dataList.netAmount !== null
										? handleNumber(
												lookMsgList.memberCurrency,
												dataList.netAmount
										  )
										: '-'
								}}
							</span>
						</span>
					</el-col>
					<el-col :span="6">
						{{ $t('game.game_betslip.noPupmNetAmount') }}：
						{{
							handleNumber(
									lookMsgList.memberCurrency,
									dataList.unPumpAmount
								)
						 }}
					</el-col>
					<el-col :span="6">
						{{ $t('game.game_betslip.pump_contribution') }}：
						{{
							handleNumber(
									lookMsgList.memberCurrency,
									dataList.userHandFee
								)
						 }}
					</el-col>
					<el-col :span="6">
						{{ $t('game.game_betslip.handCardServiceFeeContribution') }}：
						{{
							handleNumber(
								lookMsgList.memberCurrency,
								dataList.pumpContribution
							)
						}}
					</el-col>
					<el-col :span="6">
						{{ $t('game.game_betslip.bet_ip') }}：
						{{ dataList.loginIp || '-' }}
					</el-col>
					<el-col :span="6">
						{{ $t('game.game_betslip.bet_time') }}：
						<span v-if="dataList.createAtString">
							{{ dataList.createAtString || '-' }}
						</span>
						<span v-else>-</span>
					</el-col>
					<el-col :span="6">
						{{ $t('game.game_betslip.bet_device') }}：
						{{
							dataList.obDeviceType === '其他'
								? dataList.obDeviceType
								: typeFilter(
										dataList.obDeviceType,
										'loginDeviceType'
								  )
						}}
					</el-col>
					<el-col :span="6">
						{{ $t('game.game_betslip.bet_status') }}：{{
							typeFilter(dataList.obBetStatus, 'betStatusType')
						}}
					</el-col>
					<el-col :span="6">
						{{ $t('game.game_betslip.settle_time') }}：
						<span v-if="dataList.netAtString">
							{{ dataList.netAtString || '-' }}
						</span>
						<span v-else>-</span>
					</el-col>
					<el-col :span="6">
						{{ $t('game.game_betslip.ob_created_at') }}：
						<span v-if="dataList.obCreatedAt">
							{{ dataList.obCreatedAt || '-' }}
						</span>
						<span v-else>-</span>
					</el-col>
				</el-row>
			</div>
		</div>
	</div>
</template>

<script>
import list from '@/mixins/list'
export default {
  name: 'LhjDetails',
  components: {},
  mixins: [list],
  props: {
    dataList: {
      type: Object,
      default: () => ({})
    },
    lookMsgList: {
      type: Object,
      default: () => ({})
    },
    parentBetTypes: {
      type: Object,
      default: () => ({})
    },
    parentBetSubTypes: {
      type: Object,
      default: () => ({})
    }
  },
  data() {
    return {
      gameTypeList: {}
    }
  },
  computed: {
    betStatusType() {
      return this.globalDics.betStatusType || []
    }
  },
  watch: {},
  created() {
    // this.getGameTypeList()
  },
  mounted() { },
  methods: {
    getGameTypeList() {
      this.$api.getMerchantGameGamePlant().then((res) => {
        if (res && res.code === 200) {
          this.gameTypeList = res.data || []
        }
      })
    },
    amountColor(num) {
      if (parseFloat(num) > 0) return 'rgb(75, 121, 2)'
      if (parseFloat(num) < 0) return 'rgb(217, 0, 27)'
      return ''
    }
  }
}
</script>

<style lang="scss" scoped>
.view-container {
	border: 1px solid #dcdfe6;
	font-size: 14px;
}
.paddingLR {
	padding: 0 30px;
}
.betslip {
	line-height: 30px;
	padding: 30px;
	.strong {
		line-height: 70px;
	}
	.paddingB {
		padding-bottom: 30px;
	}
}
</style>
